﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.Rendering.RenderPipelineAsset
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;

#nullable disable
namespace UnityEngine.Rendering
{
  /// <summary>
  ///   <para>An asset that produces a specific IRenderPipeline.</para>
  /// </summary>
  public abstract class RenderPipelineAsset : ScriptableObject
  {
    internal RenderPipeline InternalCreatePipeline()
    {
      RenderPipeline pipeline = (RenderPipeline) null;
      try
      {
        pipeline = this.CreatePipeline();
      }
      catch (Exception ex)
      {
        if (!ex.Data.Contains((object) "InvalidImport") || !(ex.Data[(object) "InvalidImport"] is int) || (int) ex.Data[(object) "InvalidImport"] != 1)
          Debug.LogException(ex);
      }
      return pipeline;
    }

    /// <summary>
    ///   <para>The render index for the terrain brush in the editor.</para>
    /// </summary>
    /// <returns>
    ///   <para>Queue index.</para>
    /// </returns>
    public virtual int terrainBrushPassIndex => 2500;

    /// <summary>
    ///   <para>Returns the names of the Rendering Layer Masks for this pipeline.</para>
    /// </summary>
    /// <returns>
    ///   <para>An array of 32 Rendering Layer Mask names.</para>
    /// </returns>
    public virtual string[] renderingLayerMaskNames => (string[]) null;

    /// <summary>
    ///   <para>Returns the names of the Rendering Layer Masks for this pipeline, with each name prefixed by a unique numerical ID.</para>
    /// </summary>
    /// <returns>
    ///   <para>Returns the mask names defined in renderingLayerMaskNames, but with each name prefixed by its index in the array, a colon, and a space. For example, if the element with an index of 2 has the name "Example Name", its value in this array is "2: Example Name".</para>
    /// </returns>
    public virtual string[] prefixedRenderingLayerMaskNames => (string[]) null;

    /// <summary>
    ///   <para>Return the default Material for this pipeline.</para>
    /// </summary>
    /// <returns>
    ///   <para>Default material.</para>
    /// </returns>
    public virtual Material defaultMaterial => (Material) null;

    /// <summary>
    ///   <para>Retrieves the default Autodesk Interactive Shader for this pipeline.</para>
    /// </summary>
    /// <returns>
    ///   <para>Returns the default shader.</para>
    /// </returns>
    public virtual Shader autodeskInteractiveShader => (Shader) null;

    /// <summary>
    ///   <para>Retrieves the default Autodesk Interactive transparent Shader for this pipeline.</para>
    /// </summary>
    /// <returns>
    ///   <para>Returns the default shader.</para>
    /// </returns>
    public virtual Shader autodeskInteractiveTransparentShader => (Shader) null;

    /// <summary>
    ///   <para>Retrieves the default Autodesk Interactive masked Shader for this pipeline.</para>
    /// </summary>
    /// <returns>
    ///   <para>Returns the default shader.</para>
    /// </returns>
    public virtual Shader autodeskInteractiveMaskedShader => (Shader) null;

    /// <summary>
    ///   <para>Return the detail lit Shader for this pipeline.</para>
    /// </summary>
    public virtual Shader terrainDetailLitShader => (Shader) null;

    /// <summary>
    ///   <para>Return the detail grass Shader for this pipeline.</para>
    /// </summary>
    public virtual Shader terrainDetailGrassShader => (Shader) null;

    /// <summary>
    ///   <para>Return the detail grass billboard Shader for this pipeline.</para>
    /// </summary>
    public virtual Shader terrainDetailGrassBillboardShader => (Shader) null;

    /// <summary>
    ///   <para>Return the default particle Material for this pipeline.</para>
    /// </summary>
    /// <returns>
    ///   <para>Default material.</para>
    /// </returns>
    public virtual Material defaultParticleMaterial => (Material) null;

    /// <summary>
    ///   <para>Return the default Line Material for this pipeline.</para>
    /// </summary>
    /// <returns>
    ///   <para>Default material.</para>
    /// </returns>
    public virtual Material defaultLineMaterial => (Material) null;

    /// <summary>
    ///   <para>Return the default Terrain  Material for this pipeline.</para>
    /// </summary>
    /// <returns>
    ///   <para>Default material.</para>
    /// </returns>
    public virtual Material defaultTerrainMaterial => (Material) null;

    /// <summary>
    ///   <para>Return the default UI Material for this pipeline.</para>
    /// </summary>
    /// <returns>
    ///   <para>Default material.</para>
    /// </returns>
    public virtual Material defaultUIMaterial => (Material) null;

    /// <summary>
    ///   <para>Return the default UI overdraw Material for this pipeline.</para>
    /// </summary>
    /// <returns>
    ///   <para>Default material.</para>
    /// </returns>
    public virtual Material defaultUIOverdrawMaterial => (Material) null;

    /// <summary>
    ///   <para>Return the default UI ETC1  Material for this pipeline.</para>
    /// </summary>
    /// <returns>
    ///   <para>Default material.</para>
    /// </returns>
    public virtual Material defaultUIETC1SupportedMaterial => (Material) null;

    /// <summary>
    ///   <para>Return the default 2D Material for this pipeline.</para>
    /// </summary>
    /// <returns>
    ///   <para>Default material.</para>
    /// </returns>
    public virtual Material default2DMaterial => (Material) null;

    /// <summary>
    ///   <para>Gets the default 2D Mask Material used by Sprite Masks in Universal Render Pipeline.</para>
    /// </summary>
    /// <returns>
    ///   <para>Returns the default material.</para>
    /// </returns>
    public virtual Material default2DMaskMaterial => (Material) null;

    /// <summary>
    ///   <para>Return the default Shader for this pipeline.</para>
    /// </summary>
    /// <returns>
    ///   <para>Default shader.</para>
    /// </returns>
    public virtual Shader defaultShader => (Shader) null;

    /// <summary>
    ///   <para>Return the default SpeedTree v7 Shader for this pipeline.</para>
    /// </summary>
    public virtual Shader defaultSpeedTree7Shader => (Shader) null;

    /// <summary>
    ///   <para>Return the default SpeedTree v8 Shader for this pipeline.</para>
    /// </summary>
    public virtual Shader defaultSpeedTree8Shader => (Shader) null;

    /// <summary>
    ///   <para>Create a IRenderPipeline specific to this asset.</para>
    /// </summary>
    /// <returns>
    ///   <para>Created pipeline.</para>
    /// </returns>
    protected abstract RenderPipeline CreatePipeline();

    /// <summary>
    ///   <para>Default implementation of OnValidate for RenderPipelineAsset. See MonoBehaviour.OnValidate</para>
    /// </summary>
    protected virtual void OnValidate()
    {
      if (!((UnityEngine.Object) RenderPipelineManager.s_CurrentPipelineAsset == (UnityEngine.Object) this))
        return;
      RenderPipelineManager.CleanupRenderPipeline();
      RenderPipelineManager.PrepareRenderPipeline(this);
    }

    /// <summary>
    ///   <para>Default implementation of OnDisable for RenderPipelineAsset. See ScriptableObject.OnDisable</para>
    /// </summary>
    protected virtual void OnDisable() => RenderPipelineManager.CleanupRenderPipeline();
  }
}
